package com.mebs.model.inventory;

import org.jt.jet.content.JetNamedObject;
import com.mebs.model.service.procurement.ProcurementReportType;

/**
 * @author Alexander V. Ivanov
 */
public enum PurchaseOrderReportType implements JetNamedObject {
    INVENTORY_CONTROL(1, "inventory_control", "Inventory Control"),
    PURCHASE_ORDER(2, "purchase_order", "Purchase Order"),
    ITEMS_PENDING_RECEIPT(3, "items_pending_receipt", "Items Pending Receipt"),
    ITEMS_ON_HAND_RECEIPT(4, "items_on_hand_receipt", "Items On-Hand Receipt");

    public final int type;
    public final String name;
    public final String title;

    PurchaseOrderReportType(int type, String name, String title)
    {
        this.type = type;
        this.name = name;
        this.title = title;
    }

    public static PurchaseOrderReportType getObjectByType(int type)
    {
        return PurchaseOrderReportType.values()[type - 1];
    }

    public Object getObjectId()
    {
        return type;
    }

    public String getObjectName()
    {
        return name;
    }

    public int getType()
    {
        return type;
    }

    public String getName()
    {
        return name;
    }

    public String getTitle()
    {
        return title;
    }

    public String toString()
    {
        return name;
    }
}
